{% extends 'myadmin/index.html' %}
{% block title %}
<title>添加商品</title>
{% endblock %}
{% block content %}
<div class="container-fluid am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
            <div class="page-header-heading">
                <span class="am-icon-home page-header-heading-icon"></span>表单
                <small>Amaze UI</small></div>
            <p class="page-header-description">Amaze UI 有许多不同的表格可用。</p></div>
        <div class="am-u-lg-3 tpl-index-settings-button">
            <button type="button" class="page-header-button">
                <span class="am-icon-paint-brush"></span>设置</button>
        </div>
    </div>
</div>
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">添加商品</div>
                    <div class="widget-function am-fr">
                        <a href="javascript:;" class="am-icon-cog"></a>
                    </div>
                </div>
                <div class="widget-body am-fr">
                    <form class="am-form tpl-form-line-form" action="{% url 'myadmin_goods_insert' %}" enctype="multipart/form-data" method="post">
                        {% csrf_token%}

                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">选择类别
                                <span class="tpl-form-line-small-title">Title</span></label>
                             <select name="fname" data-am-selected="{btnSize: 'sm'}">
                                {% load tabels %}
                                {% for i in info %}
                                <option value="{{i.id}}" {% if i.pid == 0 %} disabled {% endif %}><span>{% nbsp i.path %}</span>{{i.name}}</option>
                                {% endfor %}
                            </select>
                        </div>

                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">商品标题
                                <span class="tpl-form-line-small-title">Title</span></label>
                            <div class="am-u-sm-9">
                                <input type="text" name="title" class="tpl-form-input" id="user-name" placeholder="请输入标题文字">
                                <small>请填写标题文字10-20字左右。</small></div>
                        </div>
                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">单价
                                <span class="tpl-form-line-small-title">Title</span></label>
                            <div class="am-u-sm-9">
                                <input type="text" name="price" class="tpl-form-input" id="user-name" placeholder="请输入标题文字">
                                <small>请填写标题文字10-20字左右。</small></div>
                        </div>
                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">库存
                                <span class="tpl-form-line-small-title">Title</span></label>
                            <div class="am-u-sm-9">
                                <input type="text" name="gnum" class="tpl-form-input" id="user-name" placeholder="请输入标题文字">
                                <small>请填写标题文字10-20字左右。</small></div>
                        </div>

                        <div class="am-form-group">
                            <label for="user-weibo" class="am-u-sm-3 am-form-label">商品图像
                                <span class="tpl-form-line-small-title">Images</span></label>
                            <div class="am-u-sm-9">
                                <div class="am-form-group am-form-file">
                                    <div class="tpl-form-file-img">
                                        <img src="/static/pics/user.png" alt=""></div>
                                    <button type="button" class="am-btn am-btn-danger am-btn-sm">
                                        <i class="am-icon-cloud-upload"></i>添加封面图片</button>
                                    <input id="doc-form-file" name="pic_url" type="file" multiple=""></div>
                            </div>
                        </div>

                         <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">商品描述
                                <span class="tpl-form-line-small-title">Title</span>
                            </label>
                            <div class="am-u-sm-9">
                                <link rel="stylesheet" type="text/css" href="/ueditor/UE/third-party/SyntaxHighlighter/shCoreDefault.css">
                                <script type="text/javascript" src="/ueditor/UE/third-party/SyntaxHighlighter/shCore.js"></script>
                                <script type="text/javascript" src="/ueditor/UE/ueditor.config.js"></script>
                                <script type="text/javascript" src="/ueditor/UE/ueditor.all.min.js"></script>
                                <script type="text/javascript" src="/ueditor/UE/lang/zh-cn/zh-cn.js"></script>

                                <script id="editor" name="info" type="text/plain" style="height:500px;color:#0f3"><h1>我是啦啦啦啦</h1></script>
                        </div>
                        <script type="text/javascript">
                            var ue = UE.getEditor('editor');
                            SyntaxHighlighter.all();
                        </script>
                      
                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3">
                                <button  class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
   
</div>
{% endblock %}